import cv2
# import numpy as np

img = cv2.imread('../asset/dog.jpg')
# kernel = np.ones((3, 3), np.uint8)
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (7, 7))
# kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (7, 7))
# kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (7, 7))q
# print(kernel)
dst = cv2.morphologyEx(img, cv2.MORPH_OPEN, kernel)
while True:
    cv2.imshow('img', img)
    cv2.imshow('dst', dst)
    key = cv2.waitKey(10)
    if key & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()
